#ifndef REGISTERWIDGET_H
#define REGISTERWIDGET_H

#include <QWidget>
#include <qtcpsocket.h>
#include <QHostAddress>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QDebug>
#include <QtWebSockets/QtWebSockets>
//#include "logonwidget.h"

namespace Ui {
class RegisterWidget;
}

/*
struct user
{
    QString username;
    QString id;
};
*/

class RegisterWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RegisterWidget(QWidget *parent = nullptr);
    ~RegisterWidget();

private slots:


    void on_btn_register_clicked();
    void on_btn_return_clicked();
    void on_btn_cancel_clicked();
    //void on_btn_Toggled();


private:
    Ui::RegisterWidget *ui;
    QTcpSocket *socket;
    QString ip;
    QString port;
    QNetworkAccessManager manager;
    //user userSelf;
};

#endif // REGISTERWIDGET_H
